#ifdef DEFINE_STRUCT
#define STRUCT_DEF_BEGIN(X) struct X {
#define DEF(type, name, defaultValue) type name;
#define STRUCT_DEF_END() };
#endif

#ifdef CONFIG_LOAD_FUNC
#define STRUCT_DEF_BEGIN(X) class Config; static void LoadFromConfig(Config* config, Properties* properties) {
#define DEF(type, name, defaultValue) properties->name = config->Get<type>(_T("Option"), _T(#name), defaultValue);
#define STRUCT_DEF_END() };
#endif 

#ifdef CONFIG_SAVE_FUNC
#define STRUCT_DEF_BEGIN(X) class Config; static void SaveToConfig(Config* config, Properties* properties) {
#define DEF(type, name, defaultValue) config->Set<type>(_T("Option"), _T(#name), properties->name);
#define STRUCT_DEF_END() };
#endif 

STRUCT_DEF_BEGIN(Properties)
	DEF(bool, IsFirstRun, true)
	DEF(int, LogLevel, 1);
	DEF(int, IsImListen, true);
	DEF(int, IsShowNextAlways, true);
	DEF(int, WndWidth, 600);
	DEF(int, WndHeight, 400);
	DEF(int, Language, -1); 
//ShowFont
	DEF(int, lfHeight, -12);
	DEF(int, lfWidth,0);
	DEF(int, lfEscapement, 0);
	DEF(int, lfOrientation,0);
	DEF(int, lfWeight, 400);
	DEF(int, lfItalic, 0);
	DEF(int, lfUnderline,0);
	DEF(int, lfStrikeOut,0);
	DEF(int, lfCharSet,134);
	DEF(int, lfOutPrecision,0);
	DEF(int, lfClipPrecision,0);
	DEF(int, lfQuality, 0);
	DEF(int, lfPitchAndFamily,0);
	DEF(string_t, lfFaceName, _T("MS Shell Dlg 2"));
//end font
	DEF(int, IconNotFixWithFont, true);
	DEF(int ,IconSize, 16);
STRUCT_DEF_END()

#undef STRUCT_DEF_BEGIN
#undef DEF
#undef STRUCT_DEF_END